package com.mico.example.springboot.jpa.multi.repository.primary;

import com.mico.example.springboot.jpa.multi.domain.primary.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by micocube
 * ProjectName: springboot-example
 * PackageName: com.mico.example.springboot.jpa.repository
 * User: micocube
 * Email: ldscube@gmail.com
 * CreateTime: 2019/2/25下午1:46
 * ModifyTime: 2019/2/25下午1:46
 * Version: 0.1
 * Description:
 **/
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
    User findByUsername(String name);

    Page<User> findByUsername(String name, Pageable pageable);

    @Override
    Page<User> findAll(Pageable pageable);
}
